/*
*	(*^。^*) TFrameWork License (*^。^*)
*/

/*
 *  Title :  
 *          
 *  Description :  
 *          
 *          
 *  Date : 
 *
 *  Author : DengPing
 *
 *  Modify : 
 */

using UnityEngine;

namespace TFrameWork.Module.ActionEditor
{
    [System.Serializable, TrackDataKey(nameof(PrefabBaseEvent))]
    public abstract class PrefabBaseEvent : RecordTrackEventBase
    {
        public GameObject prefab;
        public string prefabPath;
        public bool autoDestroy = true;

        /// <summary>
        /// 真是时间
        /// </summary>
        /// <returns></returns>
        public virtual int GetDefaultDuration()
        {
            return 10;
        }

        public override object Clone()
        {
            var clone = base.Clone() as PrefabBaseEvent;
            clone.prefab = prefab;
            clone.prefabPath = prefabPath;
            clone.autoDestroy = autoDestroy;
            return clone;
        }
    }

    [System.Serializable, ShowCreateName("创建预制体")]
    public class PrefabEvent : PrefabBaseEvent
    {
        public override object Clone()
        {
            return base.Clone();
        }
    }
}
